package org.optionparser;
/**
 * Exception is thrown when an error occurs during inserting options into parser.
 *
 */
public class NameException extends RuntimeException{

	/**
	 * Serialization UID
	 */
	private static final long serialVersionUID = -2882417072620924907L;

	/**
	 * Exception error message 
	 */
	private String message;
	
	/**
	 * Type of the Exception
	 */
	public NameExceptionType type;
	
	/**
	 * Creates new NameException 
	 * @param type
	 * 		Type of the exception
	 * @param message
	 * 		Message of the exception
	 */
	public NameException(NameExceptionType type, String message) 
	{
		this.type = type;
		this.message = message; 
	}
	
	
	/**
	 * Creates new NameException 
	 * @param message
	 * 		Message of the exception
	 */
	public NameException(String message)
	{
		this.message = message;
	}
	
	/**
	 * Return the message
	 * @return message
	 */
	public String getMessage()
	{
		return this.message;
	}
}